Conversation
Summary of ChangesHello @nyatinte, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new command, Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new /remove-ai-slop command, which is a great utility for maintaining code quality when working with AI-generated code. My review includes a suggestion to add the necessary YAML frontmatter to make the command functional and to generalize the base branch logic, ensuring the command is robust and consistent with other commands in the repository.
| # Remove AI code slop | ||
|
|
||
| Check the diff against main, and remove all AI generated slop introduced in this branch. | ||
|
|
||
| This includes: | ||
| - Extra comments that a human wouldn't add or is inconsistent with the rest of the file | ||
| - Extra defensive checks or try/catch blocks that are abnormal for that area of the codebase (especially if called by trusted / validated codepaths) | ||
| - Casts to any to get around type issues | ||
| - Any other style that is inconsistent with the file | ||
|
|
||
| Report at the end with only a 1-3 sentence summary of what you changed |
There was a problem hiding this comment.
The command definition is missing the YAML frontmatter block, which is essential for configuring the command's behavior, permissions, and description. Other commands in this repository use it to specify allowed-tools, denied-tools, model, etc. Without this, the command is likely non-functional.
Additionally, the instruction to Check the diff against main is too specific. The base branch for a feature is often develop or another branch, not always main. It's better to use a more generic term like "the base branch" to make the command more versatile.
I've provided a suggestion that adds a suitable frontmatter and generalizes the base branch instruction.
| # Remove AI code slop | |
| Check the diff against main, and remove all AI generated slop introduced in this branch. | |
| This includes: | |
| - Extra comments that a human wouldn't add or is inconsistent with the rest of the file | |
| - Extra defensive checks or try/catch blocks that are abnormal for that area of the codebase (especially if called by trusted / validated codepaths) | |
| - Casts to any to get around type issues | |
| - Any other style that is inconsistent with the file | |
| Report at the end with only a 1-3 sentence summary of what you changed | |
| --- | |
| description: "Remove AI-generated code slop from the current branch" | |
| allowed-tools: Read(*), Edit(*), Bash(git diff:*), Bash(git branch --show-current) | |
| denied-tools: Bash(git commit:*), Bash(git push:*) | |
| model: sonnet | |
| --- | |
| # Remove AI code slop | |
| Check the diff against the base branch, and remove all AI generated slop introduced in this branch. | |
| This includes: | |
| - Extra comments that a human wouldn't add or is inconsistent with the rest of the file | |
| - Extra defensive checks or try/catch blocks that are abnormal for that area of the codebase (especially if called by trusted / validated codepaths) | |
| - Casts to any to get around type issues | |
| - Any other style that is inconsistent with the file | |
| Report at the end with only a 1-3 sentence summary of what you changed |
No description provided.